﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using PetroMentor.Service.Common;
using PetroMentor.Service.Manager;

namespace PetroMentor.Service
{
    /// <summary>
    /// DeleteHandler 的摘要说明
    /// </summary>
    public class DeleteHandler : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {

            string module = context.Request.QueryString[Consts.MODULE];
            string attmodule = context.Request.QueryString[Consts.ATTACHEMENT_MODULE];
            string ids = context.Request.QueryString[Consts.DELETEIDS];

            string result = SerializeManager.DeleteByIds(module, attmodule, ids);
            context.Response.ContentType = "text/plain";
            context.Response.Write(result);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}